package ink.teamwork.base;

import lombok.Getter;

import javax.persistence.*;
import java.util.Date;

@MappedSuperclass
public abstract class BaseRecordEntity extends BaseUUIDEntity {

    @Getter
    @Temporal(TemporalType.TIMESTAMP)
    @Column(nullable = false, updatable = false)
    protected Date recordTime;

    @PrePersist
    protected void setup() {
        this.recordTime = new Date();
    }

}
